require "test/unit"
require "sort/merge_sort.rb"
require '_utils/testing_utils.rb'

class TestHeap < Test::Unit::TestCase
  CHUNK_LEN = 5        # bad ruby: no local constants
  
  def test_merge_sort()
    input = rand_array(128, 128)
    
    output = MergeSort.sort(input, CHUNK_LEN)
    
    assert_ordered(output) {|val_l, val_r| val_l <= val_r }
  end
end